<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件列表</title>
</head>
<body>
<div>
    <a href="/index">返回首页</a>
    <br>
    <table border="2">
        <tr>
            <th>序号</th>
            <th>文件名</th>
            <th>URL</th>
            <th>是否是文件夹</th>
        </tr>
        <tr th:each="t,it : ${fileList}">
            <td th:text="${it.count}"></td>
            <td th:text="${t.fileName}"></td>
            <td>
                <a th:href="${t.url}" th:text="${t.url}"></a>
            </td>
            <td th:switch = "${ t.isDir == true}" >
                <div th:case="true" th:text = "是文件夹" ></div>
                <div th:case="false" th:text = "非文件夹" ></div>
            </td>

<!--            表格错位写法：-->
<!--            <td th:if="${t.isDir == true}">-->
<!--                true-->
<!--            </td>-->
<!--            <td th:unless="${t.isDir}">-->
<!--                false-->
<!--            </td>-->

        </tr>
    </table>
    <hr>
    <ol>我是有底线的</ol>
    <a href="/index">返回首页</a>

</div>
</body>
</html>